import { createApp } from "vue";
import App from "./App.vue";
import router from "./router/index";
import "element-plus/dist/index.css";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import "./reset.css";
import ElementPlus from "element-plus";
import { createPinia } from "pinia";
import { componentPlgin } from "./components/index.ts";
import piniaPluginPersistedstate from "pinia-plugin-persistedstate"; //引入持久化插件

import "@/assets/cropperjs-main/dist/cropper.js";
import "@/assets/cropperjs-main/dist/cropper.css";
const app = createApp(App);

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
}
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);

app.use(router);
app.use(ElementPlus);
app.use(componentPlgin);
app.use(pinia);
app.mount("#app");
